package com.xunua.myaudioandvideolearning.camera1

import android.os.Build
import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.xunua.myaudioandvideolearning.R

/**
 * @author: linxunyou
 * @description:
 * @date :2022/5/7 11:37
 **/
class Camera1Activity:AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_camera1)
        getPermission()
    }
    private fun getPermission() {
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
            requestPermissions(
                arrayOf(
                    android.Manifest.permission.READ_EXTERNAL_STORAGE,
                    android.Manifest.permission.WRITE_EXTERNAL_STORAGE,
                    android.Manifest.permission.CAMERA
                ), 1
            )
        }
    }
}